package com.telecom.cms.service;

import java.util.List;
import com.telecom.cms.dao.SysTeamDAO;
import com.telecom.cms.dto.SysTeam;
import com.telecom.cms.util.Constant;

public class SysTeamMgr {
   
	public int save(SysTeam systeam){
		int result=(new SysTeamDAO()).insert(systeam);
		return result;
	}
	
	public void delete(SysTeam systeam){
		(new SysTeamDAO()).delete(systeam);
	}
	
	public List findall(){
		List result=(new SysTeamDAO()).findAll();
		return result;
	}
	public List findall(String latnid){
		if (latnid.equals((new Constant()).getPara("PROVINCEID")))
			return findall();
		List result=(new SysTeamDAO()).findAll(latnid);
		return result;
	}
	
	public SysTeam findbyid(String myid){
		SysTeam result=(new SysTeamDAO()).findById(Integer.parseInt(myid));
		return result;
	}
}
